<?php

namespace App\Console\Commands;

use App\Console\Service\RptileMessionService;
use Illuminate\Console\Command;

class Reptile extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'reptile:start {name}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Reptile:start {download|analyzer}';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $name = $this->argument('name');
        switch ($name) {
            //执行创建url
            case 'download':
                $RptileMession = new RptileMessionService();
                $RptileMession->download();
                break;
            //解析URL
            case 'analyzer':
                $RptileMession = new RptileMessionService();
                $RptileMession->analyzer();
                break;
        }
    }
}